$(function () {
   // var prefix = window.parent.document.location.href;


    $(".login_Btn").click(function () {
       //debugger;
        var  userName = $(".user_Name").val();
        var keyWord = $(".key_Word").val();
        //var prefix = location.hostname+"/"+location.port+"";
        var data1 = {userName: userName, password: keyWord};
        var datas = JSON.stringify(data1)
        debugger;
        $.ajax({
            type: "post",
            url: "/user/doAdminLogin",
            data: datas,
            contentType: "application/json;charset=utf-8", //这个是发送信息至服务器时内容编码类型
            dataType: "json",
            success: function (data) {
                console.log(JSON.stringify(data))
                if (data.statue == true) {
                    window.location.href = "index.jsp"
                } else {
                    alert(data.msg)
                }

            }
        })
    })

});